home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / falcon / wd2d_pro / sources / call_wd2.s < prev    next >
Text File  |  1995-04-27  |  2KB  |  96 lines

  1. MOD_BOX=1
  2. MOD_BOX2=0
  3. MOD_WIND=0
  4. MOD_MENU=0
  5. MOD_HEXA=0
  6. MOD_DECI=0
  7. MOD_ACC=0
  8.  
  9. NR_WINDOWS_MAX=1
  10.  
  11.     include guw_mac3.s
  12.     output d:\assemble\sources.wax\direct4d.pro\call_wpr.gtp
  13.  
  14. debut:    init_prg 64
  15.     move.l a5,command_line
  16.  
  17.     appl_find #name_wax_professional
  18.     move d0,num_app
  19.     bmi didnot_findwax
  20.  
  21.     move.l command_line,a5
  22.     clr d0
  23.     move.b $80(a5),d0        ; ligne de commande ?
  24.     beq no_message
  25.  
  26.     move #2*8,to_send
  27.     clr add_length
  28.     cmp.w #2*5-1,d0
  29.     ble.s .less10
  30.     move d0,to_send
  31.     add #3*2+1,to_send
  32.     move d0,add_length
  33.     add #1,add_length
  34.     sub #2*5,add_length
  35. .less10:
  36.     subq #1,d0
  37.     lea $81(a5),a0
  38.     lea data_msg,a1
  39. copy_name:    move.b (a0)+,(a1)+
  40.     dbf d0,copy_name
  41.     clr.b (a1)+
  42.  
  43.     move.w #224,num_message
  44.     move.w global+4,sender_id
  45.     appl_write num_app,to_send,#num_message
  46.  
  47.     lea error_occured,a0
  48.     tst d0
  49.     beq.s .erreur
  50.  
  51.     lea all_right,a0
  52.  
  53. .erreur:    bsr alert_box
  54.  
  55. fin:    restore_prg
  56.  
  57. didnot_findwax:
  58.     lea wheres_wax,a0
  59.     bsr alert_box
  60.     bra.s fin
  61.  
  62. no_message:    lea not_message,a0
  63.     bsr alert_box
  64.     bra.s fin
  65.  
  66.     section DATA
  67. error_occured:dc.b "[3][Error sending| the message ][ HOOPS ]",0
  68. all_right:    dc.b "[2][ Message Nr 224 | send normally ][ OK ]",0
  69. wheres_wax:dc.b "[3][I haven't found| WD2D_PRO in | application list ][STRANGE]",0
  70. not_message:dc.b "[3][ No command line | detected : no | message send ][ BYE ]",0
  71.  
  72. name_wax_professional:
  73.     dc.b 'WD2D_PRO',0
  74.  even
  75.  
  76.     section BSS
  77. command_line:ds.l 1
  78. num_app:    ds.w 1
  79.  
  80. to_send:    ds.w 1
  81.  
  82. num_message:ds.w 1
  83. sender_id:    ds.w 1
  84. add_length:    ds.w 1    ; nombre d'octets à envoyer en plus (total-5*2)
  85. data_msg:    ds.b 256
  86.  
  87.     END
  88.  
  89. ; dc.b 'conv=1,file1.trk,file2.trk,'    ; stéréo -> mono
  90. ; dc.b 'conv=2,file1.trk,file2.trk,file3.trk,'    ; stéréo -> R & L
  91. ; dc.b 'conv=3,file1.trk,file2.trk,'    ; mono -> stéréo
  92. ; dc.b 'conv=4,table.tab,'        ; choose compression table
  93. ; dc.b 'conv=5,file1.trk,file2.dvs,'    ; TRK stéréo -> DVS
  94. ; dc.b 'conv=6,file1.trk,file2.dvs,'    ; TRK mono -> DVS
  95. ; dc.b 'conv=7,file1.dvs,file2.trk,'    ; DVS -> TRK
  96.